package de.szut.traineeslife;

import de.szut.traineeslife.db.DataAdapter;
import de.szut.traineeslife.db.DataBaseHandler;
import de.szut.traineeslife.db.ReportContract.Report;
import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ListView;

public class ReportsListActivity extends ListActivity {

	private ListView listView;
	private DataBaseHandler dbh;
	private DataAdapter adapter;
	private final String[] from = new String[] { Report.KEY_TITEL, Report.KEY_STARTDATE,Report.KEY_ENDDATE};
	/**
	 * Ids of the categorylistitem.
	 */
	private final int[] to = new int[] { R.id.report_item_titel, R.id.report_item_dates};
	
	/* Should Display the Saved Dialogs
	 * 
	 * (non-Javadoc)
	 * @see android.app.Activity#onCreate(android.os.Bundle)
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.reports_list);
		listView = getListView();
		adapter = new DataAdapter(getApplicationContext(), R.layout.reports_list_item, null, from, to, 0);
		listView.setAdapter(adapter);
	}
}
